load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "iterator.go",
        "opener.go",
        "option.go",
    ],
    importpath = "k8s.io/test-infra/prow/io",
    visibility = ["//visibility:public"],
    deps = [
        "//prow/io/providers:go_default_library",
        "@com_github_aws_aws_sdk_go//service/s3/s3manager:go_default_library",
        "@com_github_googlecloudplatform_testgrid//util/gcs:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@com_google_cloud_go_storage//:go_default_library",
        "@dev_gocloud//blob:go_default_library",
        "@dev_gocloud//gcerrors:go_default_library",
        "@org_golang_google_api//googleapi:go_default_library",
        "@org_golang_google_api//iterator:go_default_library",
        "@org_golang_google_api//option:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//prow/io/providers:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = ["opener_test.go"],
    embed = [":go_default_library"],
    deps = ["@com_google_cloud_go_storage//:go_default_library"],
)
